#include "TypeTool.h"

TypeTool::TypeTool(void)
{
}


TypeTool::~TypeTool(void)
{
}



void TypeTool::mousePressEvent(QMouseEvent* mouseClick, PaintArea* paintArea)
{	
	paintArea->setLastPoint(mouseClick ->pos());  
	QPoint position = mouseClick->pos();
	TextElement textBox(paintArea, position);
	textBox.showTextBox();
//	this->textBoxes.push_back(textBox);

	QObject::connect(textBox.textEdit, SIGNAL(TextElement::keyPressEvent(QKeyEvent *event)), textBox.textEdit, SLOT(TextElement::handleReturnPressed()));
}	